home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / editor / auror300.zip / PALETTE.AML < prev    next >
Text File  |  1996-07-17  |  1KB  |  53 lines

  1. //--------------------------------------------------------------------
  2. // PALETTE.AML
  3. // Change Color Palette, (C) 1993-1996 by nuText Systems
  4. //
  5. // (see Palette.dox for user help)
  6. //
  7. // This macro changes the current color palette (Color.aml) and
  8. // re-compiles the editor.
  9. //
  10. // Usage:
  11. //
  12. // Select this macro from the Macro List (on the Macro menu), or run it
  13. // from the macro picklist <shift f12>.
  14. //--------------------------------------------------------------------
  15.  
  16. // compile time macros and function definitions
  17. include  bootpath "define.aml"
  18.  
  19. menu "colors"
  20.   item " &Blue and green"   "blugreen"
  21.   item " &Fluorescent"      "fluoresc"
  22.   item " &Green charcoal"   "greench"
  23.   item " &Red and blue"     "redblue"
  24.   item " &Wimbledon"        "wimbledn"
  25. end
  26.  
  27. settype "popup"
  28.  
  29. // macro help
  30. macrofile = arg 1
  31. function <f1>
  32.   helpmacro macrofile
  33. end
  34.  
  35. // display the palette menu
  36. palette = popup "colors" "Select a color palette to install" 37 '' (getcurrobj)
  37. if palette then
  38.  
  39.   // backup the existing color palette
  40.   copyfile (bootpath "color.aml") (bootpath "color.old")
  41.  
  42.   // copy the selected palette to COLOR.AML
  43.   if copyfile (getbootpath + "palette\\" + palette + ".aml")
  44.               (bootpath "color.aml") then
  45.     // recompile the editor
  46.     seteventobj (getwinobj)
  47.     send "recompile"
  48.   end
  49. end
  50.  
  51. // destroy the palette menu
  52. destroybuf "colors"
  53.